<table class="table_form" width="100%" cellspacing="0">
<form method="post" action="/index.php?m=formguide&c=index&a=show&formid={$formid}&siteid=<?php echo $this->siteid;?>"{if $no_allowed} target="member_login"{/if} name="myform{$formid}" id="myform{$formid}" onsubmit="return docredit{$formid}();">
<tbody>
 {loop $forminfos_data $field $info}
	{if $info['formtype']=='omnipotent'}
		{loop $forminfos_data $_fm $_fm_value}
			{if $_fm_value['iscomnipotent']}
				{php $info['form'] = str_replace('{'.$_fm.'}',$_fm_value['form'],$info['form']);}
			{/if}
		{/loop}
	{/if}
	<tr>
      <td width="100" align="right">{$info['name']}:</td>
      <td>{$info['form']}  {$info['tips']}</td>
    </tr>
{/loop}<input type="hidden" name="dosubmit" id="dosubmit" value="1">
	<tr>
		  <th colspan="2"  style="padding-top:5px;text-align:center;">
	      <input type="image" src="{IMG_PATH}v9/b{$formid}.png" name="Submit"/></th>
    </tr>
	</tbody>
	</form>
</table>
<script>
$().ready(function(){
	$('input.input-text{$formid}').focus(function(){
		if($(this).val()==$(this).attr('intro')){
		$(this).val('');
		}
		$(this).removeClass('intro_default');
	}).blur(function(){
		if($(this).val()==''){
			$(this).val($(this).attr('intro'));
			$(this).addClass('intro_default');
		}	
	});
	
	$('input.input-text{$formid}[value=]').each(function(){
		$(this).val($(this).attr('intro')).addClass('intro_default');
	});
});

function clearInputIntro{$formid}(){
			$('input.input-text{$formid}').each(function(){
				if($(this).val() == $(this).attr('intro')){
					$(this).val('');
				}
			});
		}
		
		function ResetInputIntro{$formid}(){
			$('input.input-text{$formid}').each(function(){
				if($(this).val() == ''){
					$(this).val($(this).attr('intro'));
				}
			});
		}
		function docredit{$formid}()
		{
			clearInputIntro{$formid}();
		 {loop $forminfos_data $field $info}
			if($('#{$field}').val()=='' || $('#{$field}').val()<1)
			{
				alert('请输入{$info['name']}');
				ResetInputIntro{$formid}();
				$('#{$field}').focus();
				return false;
			}
		 {/loop}	
		}
</script>